Page({

  data: {
    statusbar: 0,
  },

  onLoad: function (t) {
    getApp().page.onLoad(this, t), t.page_id || (t.page_id = -1), this.setData({
      options: t,
      api_host: getApp().globalData.api_host
    });
    const res = wx.getSystemInfoSync()
    var statusbarH = res.statusBarHeight * 2
    this.setData({
      statusbar: statusbarH
    })
  },

  ontopTab(e) {
    this.setData({
      showCont: e.detail
    })
    this.requestData(e.detail)
  },
  requestData(e) {
    wx.showLoading({
      type: "loading..."
    })
    var _this = this
    if (e == 1) {
      getApp().request({
        url: getApp().api.auction.recommend,
        method: "GET",
        data: {

        },
        success(res) {
          _this.setData({
            auction_live: res.data.auction_live,
            auction_live_count: res.data.auction_live_count,
            lot: res.data.lot,
            zero: res.data.zero,
            house: res.data.house,
            history: res.data.history,
            banner: res.data.banner
          })
          wx.hideLoading()
        },
        fail(res) {}
      })
    } else {}
  },
})